-- GENERATED SPELL FOR [Ironbark Protector] --


function spell0_11459(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(28858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11459', 15000, 1)
end

function spell1_11459(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(18670,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11459', 603, 1)
end

function spell2_11459(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_11459', 641, 1)
end

function Sorts_11459(pUnit, Event)
local choix_sorts_11459 = math.random(0, 2)
if choix_sorts_11459 == 0 then
pUnit:RegisterEvent('spell0_11459', 1, 1)
end
if choix_sorts_11459 == 1 then
pUnit:RegisterEvent('spell1_11459', 1, 1)
end
if choix_sorts_11459 == 2 then
pUnit:RegisterEvent('spell2_11459', 1, 1)
end
end

function mob11459_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11459', math.random(1500, 3000), 1)
end

function mob11459_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11459_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11459_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11459, 1, 'mob11459_Action')
RegisterUnitEvent(11459, 2, 'mob11459_Leave')
RegisterUnitEvent(11459, 3, 'mob11459_Kill')
RegisterUnitEvent(11459, 4, 'mob11459_Die')
